<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateGuidanceRecordsTable extends Migration
{
    public function up()
    {
        Schema::create('guidance_records', function (Blueprint $table) {
            $table->id();
            $table->foreignId('selection_id')->constrained('topic_selections')->onDelete('cascade');
            $table->timestamp('record_time')->useCurrent();
            $table->text('content');
            $table->text('teacher_feedback')->nullable();
            $table->timestamp('created_at')->useCurrent();
        });
    }

    public function down()
    {
        Schema::dropIfExists('guidance_records');
    }
} 